If the soil particles are too big, as with sand and gravel, the water moves straight through the soil and doesn't get pulled back up. If the soil particles are too small, and therefore tightly packed together, the water cannot get through the soil so just sits on top (leading to waterlogged soil). Loam is a mixture of sand and clay, therefore the soil particles are the right size to allow good capillary action.